<!DOCTYPE html>
<html>
<head>
	<title>pinglun</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, user-scalabel=no, minimum-scale=1.0, maximum-scale=1.0">
	<link rel="stylesheet" type="text/css" href="/static/diary/css/pinglun.css">
	<style type="text/css">
		.topArrowleft{
			background:  url(./assets/arrow.png) 0 center no-repeat;
			/*background-position: center;*/
			/*background-size: auto;*/
		}
	</style>
</head>
<body>
<header>
	 <!-- <div class="topArrowleft"><img src="./assets/arrow.png"></div>  -->
	 <div class="topArrowleft"></div> 
	<div class="topTit">发表评论</div>
	 <div class="topFabu">发布</div> 
</header>
<section>
	<!-- <input type="text" name="" placeholder="请输入文字"> -->
	<textarea   id="content" placeholder=" 请输入文字"></textarea>
</section>
</body>
<script type="text/javascript" src="/static/common/js/zepto.js"></script>
<script type="text/javascript" src="/static/common/js/vue.js"></script>
<script type="text/javascript" src="/static/common/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript">
	(function(){
		// 点击左箭头返回上一页面
		$('.topArrowleft').on('click',function(){
			// e.preventDefault();
			window.location.href= 'rijiZW.html';
		});
		// 评论数据
		$('.topFabu').click(function(){
			console.log('ni');
			var messsge=$('#content').val();
			console.log(messsge);
			$.ajax({
				type: "post",
				url: 'https://clubbear.clubbear.cn/diary/CommitComment',
				data:{
					uid:1,
					did:1,
					content:messsge
				},
				dataType: "json",
				success: function (data) {
					if(messsge != ''){
						// alert('1');
						console.log(data);
						window.location.href= 'rijiZW.html';
					}else{
						console.log('内容为空');
					}							
				},
				error: function (data) {
		  		    console.log(data);	
				}
			});	
		})
	})()
</script>
</html>